//
//  twolevelTableViewCell.m
//  BAOASystem
//
//  Created by michael on 2018/1/29.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "twolevelTableViewCell.h"

@implementation twolevelTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
                self.backgroundColor = [UIColor colorWithHexString:@"e2e2e5"];

  self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;//cell的右边有一个小箭头，距离右边有十几像素；
       self.selectionStyle = UITableViewCellSelectionStyleNone;
 _label1 = [[UILabel alloc]init];
    _label1.frame = CGRectZero;
    
      [_label1 setFont:[UIFont boldSystemFontOfSize:14]];
       [self.contentView addSubview:_label1];
   
_image = [[UIImageView alloc]init];
_image.frame = CGRectZero;
//       [self.contentView addSubview:_image];
    
       _image2 = [[UIImageView alloc]init];
_image2.frame = CGRectZero;
_image2.hidden = YES;
       [self.contentView addSubview:_image2];
}

return self;

}


- (void)layoutSubviews{
[super layoutSubviews];
//_image.frame = CGRectMake(10, 2, 40, 40);
//_image.image = [UIImage imageNamed:@"全部分类"];
_image2.frame = CGRectMake((KScreenWidth-60)/2-20, 12, 20, 20);

_image2.image = [UIImage imageNamed:@"三级"];
if (self.selected) {
//    _image2.hidden = NO;
}
_label1.frame = CGRectMake(10, 2, KScreenWidth-20, 40);
_label1.text = _string;

_label1.backgroundColor = [UIColor clearColor];
_label1.textColor = [UIColor colorWithHexString:@"484848"];

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end

